package org.hbhk.hms.mq.tx.mq;

import java.io.Serializable;
import java.util.Map;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.google.common.collect.Maps;

/**
 * 
 * "payload":{"waybillNo":140013550799,"recordVersion":0,"dataSourceType":3}}
 *
 */
public class MqMsgVo<T> implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -1270764896581753985L;

	private Map<String, String> header = Maps.newHashMap();

	@JsonIgnore
	private String tags = "*";

	@JsonIgnore
	private String key;

	@JsonIgnore
	private int delay = 0;

	public void put(String key, String val) {
		header.put(key, val);
	}

	public String get(String key) {
		return header.get(key);
	}

	private T body;

	public T getBody() {
		return body;
	}

	public void setBody(T body) {
		this.body = body;
	}

	public Map<String, String> getHeader() {
		return header;
	}

	public void setHeader(Map<String, String> header) {
		this.header = header;
	}

	public String getTags() {
		return tags;
	}

	public void setTags(String tags) {
		this.tags = tags;
	}

	public String getKey() {
		return key;
	}

	public void setKey(String key) {
		this.key = key;
	}

	public int getDelay() {
		return delay;
	}

	public void setDelay(int delay) {
		this.delay = delay;
	}

}
